CC=c99
REV = 32
IP_BEAGLE = 192.168.1.1
CFLAGS= -I"/usr/include/SDL" -c -g -Wall 
LDFLAGS= -lSDL -lSDL_ttf -lSDL_image -g 
SOURCES=gelsyr_ui.c display_menue.c libgeisyr.c display_state.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=UI

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC)  $(OBJECTS) $(LDFLAGS)  -o $@

.c.o:
	$(CC) $(CFLAGS) $< -o $@
clean:
	rm $(OBJECTS) $(EXECUTABLE)

install:
	chmod 755 $(EXECUTABLE)

get_sdl:
	sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev

get_sdl_beagle:
	opkg install libsdl-1.2-dev libsdl-image-1.2-dev libsdl-ttf-2.0-dev

install_beagle:
	scp makefile $(SOURCES) $(SOURCES:.c=.h) root@$(IP_BEAGLE):~/Desktop/embeddedstuff

zipski: 
	zip -r gelsyr_ui_$(REV).zip $(SOURCES) $(SOURCES:.c=.h) pics/ LiberationSans-Regular.ttf libs/ 
	mv gelsyr_ui_$(REV).zip Rev/
	svn add Rev/gelsyr_ui_$(REV).zip
